				<?php if(!sizeof($projects)): ?>
					<h1><?php echo __('Projektid ei leitud') ?></h1>
				<?php else: ?>
					<h1><?php echo __('Teostatud lahendused:') ?></h1>
					<div class="clear">
                        <?php if(sizeof($projects)): ?>
						<p>
                            <?php if($sf_request->getParameter('sort') == 'date'): ?>
                                <a href="?sort=date" onclick="return false;" style="cursor: default;">AJA JARGI</a>
                            <?php else: ?>
                                <a href="?sort=date">AJA JARGI</a>
                            <?php endif; ?>

                            <?php if($sf_request->getParameter('sort') == 'a-z'): ?>
                                <a href="?sort=a-z" onclick="return false;" style="cursor: default;">A-Z</a>
                            <?php else: ?>
                                <a href="?sort=a-z">A-Z</a>
                            <?php endif; ?>
						</p>
							<?php if(isset($page)): ?>
								<?php if($page->getPrev()): ?>
									<p><a href="?page=<?php echo $page->getPrev() ?>" id="prev">EELMINE</a></p>
								<?php endif; ?>
								<p id="nav">
									<?php foreach($page->getPages() as $number): ?>
										<?php if($number != '...'): ?>
											<?php if($number != $page->getCurrent()): ?>
												<p><a href="?page=<?php echo $number ?>"><?php echo $number ?></a></p>
											<?php else: ?>
												<p><a style="color: #fff;" href="?page=<?php echo $number ?>"><?php echo $number ?></a></p>
											<?php endif; ?>
										<?php else: ?>
											<p><a>...</a></p>
										<?php endif; ?>
									<?php endforeach; ?>
								</p>
								<?php if($page->getNext()): ?>
									<p><a href="?page=<?php echo $page->getNext() ?>" id="prev">JARGMINE</a></p>
								<?php endif; ?>
							<?php endif; ?>
                        <?php endif; ?>
					</div>
					<div class="projects-list-container projects-list">
						<div class="item">
                            <?php if($projects): ?>
							<?php foreach($projects as $project): ?>
								<a href="<?php echo $links[$project['id']] ?>" class="item clear next">
									<span class="a"></span>
									<span class="b">
										<span class="col col01">
											<span class="heading1"><?php echo $project->getName() ?></span>
											<span class="heading2"><?php echo $project->getDescription() ?></span>
										</span>
										<span class="images">
											<?php if($project->brand_picture): ?>
												<img src="/web/uploads<?php echo $project->brand_picture ?>" alt="" />
											<?php endif; ?>
										</span>
									</span>
								</a>
							<?php endforeach; ?>
                            <?php else: ?>
                                <div style="margin: 50px 0 0 40px;">
                                    Siin ei ole veel mitte midagi.
                                </div>
                            <?php endif; ?>
						</div>
					</div>
				<?php endif; ?>